#pragma once
#include <cstdint>
#include "Socket.h"
namespace xncc {
namespace foundation {
    static constexpr uint32_t MAX_UDP_MSG_LEN = UINT16_MAX - 8 - 20;

    class UdpSocket final : public Socket
    {
      public:
        explicit UdpSocket(const std::shared_ptr<XnccAddress>& addr) : Socket(addr) {}

        ~UdpSocket() override;

        UdpSocket(const UdpSocket&)             = delete;
        UdpSocket(const UdpSocket&&)            = delete;
        UdpSocket& operator=(const UdpSocket&)  = delete;
        UdpSocket& operator=(const UdpSocket&&) = delete;

        void bind() override;

        void listen() override {}

        int accept(std::shared_ptr<XnccAddress> /*peeraddr*/) override { return 0; }

        void bind(int sockfd);
    };
}  // namespace foundation
}  // namespace xncc